<?php
if( (isset($_POST['valider']) AND isset($_POST['parse_code'])) OR (isset($_GET['parse_page']) AND !empty($_GET['parse_page'])) ) {
	if(isset($_POST['valider']) AND isset($_POST['parse_code'])) {
		$page = $_POST['parse_code'];
	}
	if( isset($_GET['parse_page']) AND !empty($_GET['parse_page']) ) {
		$page = $_GET['parse_page'];
	}
	print_r( '<pre>'. json_decode($page) .'</pre>');
}
else {
	echo '<form name="parse_page" action="./parse.php" method="post">
		<p>Entrez l\'url de votre page: <input type="text" name="parse_code" /> <input type="submit" name="valider" value="OK"/></p>
	</form>';
}
?>